/**
 * Created by JetBrains WebStorm.
 * User: Administrator
 * Date: 13-3-4
 * Time: 下午10:03
 * To change this template use File | Settings | File Templates.
 */
function getNewContent(){
    var request = getHTTPObject();
    if(request){
        request.open('GET','./example.txt',true);
        request.onreadystatechange = function(){
            if(request.readyState == 4){
                var para = document.createElement('p');
                var txt = document.createTextNode(request.responseText);
                para.appendChild(txt);
                document.getElementById('new').appendChild(para);
            }
        };
        request.send(null);alert(1);
    }else{
        alert('sorry... ');
    }
}
alert(1);
addLoadEvent(getNewContent);